package com.zrwl.poscloud.commons.feign;

import com.zrwl.poscloud.commons.config.feign.FeignConfiguration;
import com.zrwl.poscloud.commons.fallback.GateServerFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * proxy相关接口
 * 注释以后就不会再尝试获取proxy的微服务了
 *
 * @author liusitong
 */
@FeignClient(name = "pos-equipment-server", configuration = FeignConfiguration.class, fallback = GateServerFeignFallback.class)
public interface GateServerFeignClient {

    /**
     * gateInfo getList
     */
    @RequestMapping(value = "/gateInfo/getList", method = RequestMethod.GET)
    String getList();

    /**
     * 废弃
     * gatePosProxy getPosCodeByName
     */
    @RequestMapping(value = "/gatePosProxy/getPosCodeByName", method = RequestMethod.POST)
    String getPosCodeByName(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "equipmentName") String equipmentName);

    /**
     * gatePosProxy updatePosTimeByName
     */
    @RequestMapping(value = "/gatePosProxy/updatePosTimeByName", method = RequestMethod.POST)
    String updatePosTimeByName(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * gatePosProxy getPosVersion
     */
    @RequestMapping(value = "/gatePosProxy/getPosVersion", method = RequestMethod.POST)
    String getPosVersion(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * 废弃
     * gatePosProxy getPosIMMEUID
     */
    @RequestMapping(value = "/gatePosProxy/getPosIMMEUID", method = RequestMethod.POST)
    String getPosIMMEUID(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "equipmentName") String equipmentName);

    /**
     * gatePosProxy getPosCardPwd
     */
    @RequestMapping(value = "/gatePosProxy/getPosCardPwd", method = RequestMethod.POST)
    String getPosCardPwd(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * gatePosProxy initializationPOS
     */
    @RequestMapping(value = "/gatePosProxy/initializationPOS", method = RequestMethod.POST)
    String initializationPOS(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * gatePosProxy getPOSBlackPackageNo
     */
    @RequestMapping(value = "/gatePosProxy/getPOSBlackPackageNo", method = RequestMethod.POST)
    String getPOSBlackPackageNo(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * gatePosProxy getPOSTime
     */
    @RequestMapping(value = "/gatePosProxy/getPOSTime", method = RequestMethod.POST)
    String getPOSTime(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * gatePosProxy setEquipmentName
     */
    @RequestMapping(value = "/gatePosProxy/setEquipmentName", method = RequestMethod.POST)
    String setEquipmentName(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode, @RequestParam(value = "newEquipmentName") String newEquipmentName);

    /**
     * gatePosProxy getEquipmentNoUploadedRecord
     */
    @RequestMapping(value = "/gatePosProxy/getEquipmentNoUploadedRecord", method = RequestMethod.POST)
    String getEquipmentNoUploadedRecord(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "posCode") String posCode);

    /**
     * gateDataSync updateICCardAuthListOrder
     */
    @RequestMapping(value = "/gateDataSync/updateICCardAuthListOrder", method = RequestMethod.POST)
    String updateICCardAuthListOrder(@RequestParam(value = "gateCodeList") List<String> gateCodeList, @RequestParam(value = "jsonStr") String jsonStr);

    /**
     * gateDataSync noticeGateSyncICCardLogDataOrder
     */
    @RequestMapping(value = "/gateDataSync/noticeGateSyncICCardLogDataOrder", method = RequestMethod.POST)
    String noticeGateSyncICCardLogDataOrder(@RequestParam(value = "gateCodeList") List<String> gateCodeList, @RequestParam(value = "syncFlowCode") String syncFlowCode);

    /**
     * gateDataSync updateGateEquipmentConfigOrder
     */
    @RequestMapping(value = "/gateDataSync/updateGateEquipmentConfigOrder", method = RequestMethod.POST)
    String updateGateEquipmentConfigOrder(@RequestParam(value = "gateCode") String gateCode, @RequestParam(value = "equipmentCode") String equipmentCode);

    /**
     * gateDataSync updateGateEquipmentConfigGateOrder
     */
    @RequestMapping(value = "/gateDataSync/updateGateEquipmentConfigGateOrder", method = RequestMethod.POST)
    String updateGateEquipmentConfigGateOrder(@RequestParam(value = "gateCode") String gateCode);

    /**
     * gateDataSync noticeGateSyncICCardLogDataOrder
     */
    @RequestMapping(value = "/gateDataSync/noticeGateSyncEmployeeDataOrder", method = RequestMethod.POST)
    String noticeGateSyncEmployeeDataOrder(@RequestParam(value = "gateCodeList") List<String> gateCodeList, @RequestParam(value = "syncCode") String syncCode);

    /**
     * gateDataSync getCompanyEquipmentOnlineList
     */
    @RequestMapping(value = "/gateDataSync/getCompanyEquipmentOnlineList", method = RequestMethod.POST)
    String getCompanyEquipmentOnlineList(@RequestParam(value = "ownerUid") String ownerUid);

    /**
     * gateDataSync getCompanyEquipmentOnlineInfo
     */
    @RequestMapping(value = "/gateDataSync/getCompanyEquipmentOnlineInfo", method = RequestMethod.POST)
    String getCompanyEquipmentOnlineInfo(@RequestParam(value = "ownerUid") String ownerUid);


    ////////////////////////新

    /**
     * outsideInterfaceLog createNewOutSideLog
     */
    @RequestMapping(value = "/outsideInterfaceLog/createNewOutSideLog", method = RequestMethod.POST)
    String createNewOutSideLog(@RequestParam(value = "jsonStr") String jsonStr);

    /**
     * outsideInterfaceLog outsideInterfaceTransfer
     */
    @RequestMapping(value = "/outsideInterfaceLog/outsideInterfaceTransfer", method = RequestMethod.POST)
    String outsideInterfaceTransfer(@RequestParam(value = "jsonStr") String jsonStr);

}